How can I properly create a regex with a variable identifier in JavaScript

welcome to shbcf.ru